package com.lecture.java8.fel;

import com.greenpineyu.fel.FelEngine;
import com.greenpineyu.fel.FelEngineImpl;
import com.greenpineyu.fel.context.FelContext;

public class Demo1 {
    public static void main(String[] args) {
        String rule = "X >= 599 && X < 600";

        FelEngine fel = new FelEngineImpl();
        FelContext context = fel.getContext();
        context.set("X",599.7);
        context.set("X",601);
        Object eval = fel.eval(rule, context);
        System.out.println(eval);

        rule = "16-(600-X)/0.1*0.6";
        Object eval1 = fel.eval(rule, context);
        System.out.println(eval1);
    }
}
